.class public Lcom/waiqin365/h5/customer/WqCustomerSelect;
.super Lorg/apache/cordova/CordovaPlugin;

# interfaces
.implements Ljava/util/Observer;


# instance fields
.field public final a:Ljava/lang/String;

.field private b:Lorg/apache/cordova/WqCordovaActivity;

.field private c:Lorg/apache/cordova/CallbackContext;

.field private d:Lorg/apache/cordova/CordovaArgs;


# direct methods
.method public constructor <init>()V
    .locals 1

    invoke-direct {p0}, Lorg/apache/cordova/CordovaPlugin;-><init>()V

    invoke-static {}, Ljava/util/UUID;->randomUUID()Ljava/util/UUID;

    move-result-object v0

    invoke-virtual {v0}, Ljava/util/UUID;->toString()Ljava/lang/String;

    move-result-object v0

    iput-object v0, p0, Lcom/waiqin365/h5/customer/WqCustomerSelect;->a:Ljava/lang/String;

    return-void
.end method

.method static synthetic a(Lcom/waiqin365/h5/customer/WqCustomerSelect;)Lorg/apache/cordova/WqCordovaActivity;
    .locals 1

    iget-object v0, p0, Lcom/waiqin365/h5/customer/WqCustomerSelect;->b:Lorg/apache/cordova/WqCordovaActivity;

    return-object v0
.end method

.method static synthetic b(Lcom/waiqin365/h5/customer/WqCustomerSelect;)Lorg/apache/cordova/CordovaArgs;
    .locals 1

    iget-object v0, p0, Lcom/waiqin365/h5/customer/WqCustomerSelect;->d:Lorg/apache/cordova/CordovaArgs;

    return-object v0
.end method


# virtual methods
.method public execute(Ljava/lang/String;Lorg/apache/cordova/CordovaArgs;Lorg/apache/cordova/CallbackContext;)Z
    .locals 2

    iget-object v0, p0, Lcom/waiqin365/h5/customer/WqCustomerSelect;->cordova:Lorg/apache/cordova/CordovaInterface;

    invoke-interface {v0}, Lorg/apache/cordova/CordovaInterface;->getActivity()Landroid/app/Activity;

    move-result-object v0

    check-cast v0, Lorg/apache/cordova/WqCordovaActivity;

    iput-object v0, p0, Lcom/waiqin365/h5/customer/WqCustomerSelect;->b:Lorg/apache/cordova/WqCordovaActivity;

    iput-object p3, p0, Lcom/waiqin365/h5/customer/WqCustomerSelect;->c:Lorg/apache/cordova/CallbackContext;

    iput-object p2, p0, Lcom/waiqin365/h5/customer/WqCustomerSelect;->d:Lorg/apache/cordova/CordovaArgs;

    iget-object v0, p0, Lcom/waiqin365/h5/customer/WqCustomerSelect;->b:Lorg/apache/cordova/WqCordovaActivity;

    invoke-virtual {v0}, Lorg/apache/cordova/WqCordovaActivity;->getThreadPool()Ljava/util/concurrent/ExecutorService;

    move-result-object v0

    new-instance v1, Lcom/waiqin365/h5/customer/b;

    invoke-direct {v1, p0}, Lcom/waiqin365/h5/customer/b;-><init>(Lcom/waiqin365/h5/customer/WqCustomerSelect;)V

    invoke-interface {v0, v1}, Ljava/util/concurrent/ExecutorService;->execute(Ljava/lang/Runnable;)V

    const/4 v0, 0x1

    return v0
.end method

.method public update(Ljava/util/Observable;Ljava/lang/Object;)V
    .locals 4

    if-eqz p2, :cond_0

    instance-of v0, p2, Lcom/waiqin365/lightapp/view/a/a;

    if-eqz v0, :cond_0

    iget-object v1, p0, Lcom/waiqin365/h5/customer/WqCustomerSelect;->a:Ljava/lang/String;

    move-object v0, p2

    check-cast v0, Lcom/waiqin365/lightapp/view/a/a;

    iget-object v0, v0, Lcom/waiqin365/lightapp/view/a/a;->a:Ljava/lang/String;

    invoke-virtual {v1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_0

    check-cast p2, Lcom/waiqin365/lightapp/view/a/a;

    iget-object v0, p2, Lcom/waiqin365/lightapp/view/a/a;->b:Ljava/lang/Object;

    check-cast v0, Lcom/waiqin365/lightapp/kehu/b/am;

    invoke-static {}, Lcom/waiqin365/lightapp/view/a/b;->a()Ljava/util/Observable;

    move-result-object v1

    invoke-virtual {v1, p0}, Ljava/util/Observable;->deleteObserver(Ljava/util/Observer;)V

    if-eqz v0, :cond_0

    new-instance v2, Lorg/json/JSONObject;

    invoke-direct {v2}, Lorg/json/JSONObject;-><init>()V

    :try_start_0
    const-string/jumbo v1, "check"

    iget-boolean v3, v0, Lcom/waiqin365/lightapp/kehu/b/am;->s:Z

    invoke-virtual {v2, v1, v3}, Lorg/json/JSONObject;->put(Ljava/lang/String;Z)Lorg/json/JSONObject;

    const-string/jumbo v1, "distance"

    iget v3, v0, Lcom/waiqin365/lightapp/kehu/b/am;->p:I

    invoke-virtual {v2, v1, v3}, Lorg/json/JSONObject;->put(Ljava/lang/String;I)Lorg/json/JSONObject;

    const-string/jumbo v1, "labelType"

    iget v3, v0, Lcom/waiqin365/lightapp/kehu/b/am;->r:I

    invoke-virtual {v2, v1, v3}, Lorg/json/JSONObject;->put(Ljava/lang/String;I)Lorg/json/JSONObject;

    const-string/jumbo v3, "addr"

    iget-object v1, v0, Lcom/waiqin365/lightapp/kehu/b/am;->f:Ljava/lang/String;

    invoke-static {v1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v1

    if-eqz v1, :cond_1

    const-string/jumbo v1, ""

    :goto_0
    invoke-virtual {v2, v3, v1}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    const-string/jumbo v3, "approval_status"

    iget-object v1, v0, Lcom/waiqin365/lightapp/kehu/b/am;->n:Ljava/lang/String;

    invoke-static {v1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v1

    if-eqz v1, :cond_2

    const-string/jumbo v1, ""

    :goto_1
    invoke-virtual {v2, v3, v1}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    const-string/jumbo v3, "code"

    iget-object v1, v0, Lcom/waiqin365/lightapp/kehu/b/am;->c:Ljava/lang/String;

    invoke-static {v1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v1

    if-eqz v1, :cond_3

    const-string/jumbo v1, ""

    :goto_2
    invoke-virtual {v2, v3, v1}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    const-string/jumbo v3, "cooperate_status"

    iget-object v1, v0, Lcom/waiqin365/lightapp/kehu/b/am;->m:Ljava/lang/String;

    invoke-static {v1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v1

    if-eqz v1, :cond_4

    const-string/jumbo v1, ""

    :goto_3
    invoke-virtual {v2, v3, v1}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    const-string/jumbo v3, "district_id"

    iget-object v1, v0, Lcom/waiqin365/lightapp/kehu/b/am;->h:Ljava/lang/String;

    invoke-static {v1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v1

    if-eqz v1, :cond_5

    const-string/jumbo v1, ""

    :goto_4
    invoke-virtual {v2, v3, v1}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    const-string/jumbo v3, "id"

    iget-object v1, v0, Lcom/waiqin365/lightapp/kehu/b/am;->a:Ljava/lang/String;

    invoke-static {v1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v1

    if-eqz v1, :cond_6

    const-string/jumbo v1, ""

    :goto_5
    invoke-virtual {v2, v3, v1}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    const-string/jumbo v3, "lat"

    iget-object v1, v0, Lcom/waiqin365/lightapp/kehu/b/am;->j:Ljava/lang/String;

    invoke-static {v1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v1

    if-eqz v1, :cond_7

    const-string/jumbo v1, ""

    :goto_6
    invoke-virtual {v2, v3, v1}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    const-string/jumbo v3, "location"

    iget-object v1, v0, Lcom/waiqin365/lightapp/kehu/b/am;->i:Ljava/lang/String;

    invoke-static {v1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v1

    if-eqz v1, :cond_8

    const-string/jumbo v1, ""

    :goto_7
    invoke-virtual {v2, v3, v1}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    const-string/jumbo v3, "lon"

    iget-object v1, v0, Lcom/waiqin365/lightapp/kehu/b/am;->k:Ljava/lang/String;

    invoke-static {v1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v1

    if-eqz v1, :cond_9

    const-string/jumbo v1, ""

    :goto_8
    invoke-virtual {v2, v3, v1}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    const-string/jumbo v3, "manager_name"

    iget-object v1, v0, Lcom/waiqin365/lightapp/kehu/b/am;->l:Ljava/lang/String;

    invoke-static {v1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v1

    if-eqz v1, :cond_a

    const-string/jumbo v1, ""

    :goto_9
    invoke-virtual {v2, v3, v1}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    const-string/jumbo v3, "name"

    iget-object v1, v0, Lcom/waiqin365/lightapp/kehu/b/am;->d:Ljava/lang/String;

    invoke-static {v1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v1

    if-eqz v1, :cond_b

    const-string/jumbo v1, ""

    :goto_a
    invoke-virtual {v2, v3, v1}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    const-string/jumbo v3, "name_py"

    iget-object v1, v0, Lcom/waiqin365/lightapp/kehu/b/am;->e:Ljava/lang/String;

    invoke-static {v1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v1

    if-eqz v1, :cond_c

    const-string/jumbo v1, ""

    :goto_b
    invoke-virtual {v2, v3, v1}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    const-string/jumbo v3, "trade_type"

    iget-object v1, v0, Lcom/waiqin365/lightapp/kehu/b/am;->b:Ljava/lang/String;

    invoke-static {v1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v1

    if-eqz v1, :cond_d

    const-string/jumbo v1, ""

    :goto_c
    invoke-virtual {v2, v3, v1}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    const-string/jumbo v3, "type_id"

    iget-object v1, v0, Lcom/waiqin365/lightapp/kehu/b/am;->g:Ljava/lang/String;

    invoke-static {v1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v1

    if-eqz v1, :cond_e

    const-string/jumbo v1, ""

    :goto_d
    invoke-virtual {v2, v3, v1}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    const-string/jumbo v1, "type_image"

    iget-object v3, v0, Lcom/waiqin365/lightapp/kehu/b/am;->q:Ljava/lang/String;

    invoke-static {v3}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v3

    if-eqz v3, :cond_f

    const-string/jumbo v0, ""

    :goto_e
    invoke-virtual {v2, v1, v0}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;
    :try_end_0
    .catch Lorg/json/JSONException; {:try_start_0 .. :try_end_0} :catch_0

    :goto_f
    iget-object v0, p0, Lcom/waiqin365/h5/customer/WqCustomerSelect;->c:Lorg/apache/cordova/CallbackContext;

    invoke-virtual {v0, v2}, Lorg/apache/cordova/CallbackContext;->success(Lorg/json/JSONObject;)V

    :cond_0
    return-void

    :cond_1
    :try_start_1
    iget-object v1, v0, Lcom/waiqin365/lightapp/kehu/b/am;->f:Ljava/lang/String;

    goto/16 :goto_0

    :cond_2
    iget-object v1, v0, Lcom/waiqin365/lightapp/kehu/b/am;->n:Ljava/lang/String;

    goto/16 :goto_1

    :cond_3
    iget-object v1, v0, Lcom/waiqin365/lightapp/kehu/b/am;->c:Ljava/lang/String;

    goto/16 :goto_2

    :cond_4
    iget-object v1, v0, Lcom/waiqin365/lightapp/kehu/b/am;->m:Ljava/lang/String;

    goto/16 :goto_3

    :cond_5
    iget-object v1, v0, Lcom/waiqin365/lightapp/kehu/b/am;->h:Ljava/lang/String;

    goto/16 :goto_4

    :cond_6
    iget-object v1, v0, Lcom/waiqin365/lightapp/kehu/b/am;->a:Ljava/lang/String;

    goto/16 :goto_5

    :cond_7
    iget-object v1, v0, Lcom/waiqin365/lightapp/kehu/b/am;->j:Ljava/lang/String;

    goto/16 :goto_6

    :cond_8
    iget-object v1, v0, Lcom/waiqin365/lightapp/kehu/b/am;->i:Ljava/lang/String;

    goto/16 :goto_7

    :cond_9
    iget-object v1, v0, Lcom/waiqin365/lightapp/kehu/b/am;->k:Ljava/lang/String;

    goto/16 :goto_8

    :cond_a
    iget-object v1, v0, Lcom/waiqin365/lightapp/kehu/b/am;->l:Ljava/lang/String;

    goto/16 :goto_9

    :cond_b
    iget-object v1, v0, Lcom/waiqin365/lightapp/kehu/b/am;->d:Ljava/lang/String;

    goto :goto_a

    :cond_c
    iget-object v1, v0, Lcom/waiqin365/lightapp/kehu/b/am;->e:Ljava/lang/String;

    goto :goto_b

    :cond_d
    iget-object v1, v0, Lcom/waiqin365/lightapp/kehu/b/am;->b:Ljava/lang/String;

    goto :goto_c

    :cond_e
    iget-object v1, v0, Lcom/waiqin365/lightapp/kehu/b/am;->g:Ljava/lang/String;

    goto :goto_d

    :cond_f
    iget-object v0, v0, Lcom/waiqin365/lightapp/kehu/b/am;->q:Ljava/lang/String;
    :try_end_1
    .catch Lorg/json/JSONException; {:try_start_1 .. :try_end_1} :catch_0

    goto :goto_e

    :catch_0
    move-exception v0

    goto :goto_f
.end method
